package com.bdqn.springbootno1.config;

//代替web.xml文件
/* public class MyWebApplicationInitializer implements WebApplicationInitializer {

    //  项目启动的时候就拉起springmvc框架
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        //Load Spring web application configuration
        AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
        context.register(AppConfig.class);
        //Create and register the DispatcherServlet
        DispatcherServlet servlet = new DispatcherServlet();
        ServletRegistration.Dynamic springmvc = servletContext.addServlet("springmvc", servlet);
        springmvc.setLoadOnStartup(0);
        springmvc.addMapping("/");
    }
} */
